﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using ShevaEngine.Core.Modules.Graphics;

namespace ShevaEngine.Core.Modules.Scenes
{
    /// <summary>
    /// Graphics scene object node.
    /// </summary>
    public class GraphicsSceneObjectNode
    {
        /// <summary>Children.</summary>
        public List<GraphicsSceneObjectNode> Children;        

        /// <summary>
        /// Constructor.
        /// </summary>
        public GraphicsSceneObjectNode()
        {
            this.Children = new List<GraphicsSceneObjectNode>();
        }

        /// <summary>
        /// Override Add in rendering pipeline method.
        /// </summary>
        /// <param name="renderingPipeline"></param>
        public virtual void AddInRenderingPipeline(RenderingPipeline renderingPipeline, Matrix worldMatrix)
        {
            for (int i = 0; i < this.Children.Count; i++)
                this.Children[i].AddInRenderingPipeline(renderingPipeline, worldMatrix);
        }
    }
}
